import { USER_GET_USERINFO, USER_REGISTER, USER_GET_HOSPITAL } from '../actions/sign';

const INITIAL_STATE = {userInfo:{}};

export default function (state = INITIAL_STATE, action) {
    switch (action.type) {
        case USER_GET_USERINFO:
            return {
                ...state,
                userInfo: action.payload.data,
            };
        case USER_REGISTER:
            return {
                ...state
            };
        case USER_GET_HOSPITAL:
            return {
                ...state,
                hospitals: action.payload.data
            };
        default:
            return state;
    }
}

